.class Lrexsee/core/browser/clazz/PregFilterListener$1;
.super Ljava/lang/Thread;
.source "PregFilterListener.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lrexsee/core/browser/clazz/PregFilterListener;->run(Landroid/content/Context;Lrexsee/core/browser/Browser;Ljava/lang/String;)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lrexsee/core/browser/clazz/PregFilterListener;

.field private final synthetic val$browser:Lrexsee/core/browser/Browser;

.field private final synthetic val$url:Ljava/lang/String;


# direct methods
.method constructor <init>(Lrexsee/core/browser/clazz/PregFilterListener;Lrexsee/core/browser/Browser;Ljava/lang/String;)V
    .locals 0

    .prologue
    .line 1
    iput-object p1, p0, Lrexsee/core/browser/clazz/PregFilterListener$1;->this$0:Lrexsee/core/browser/clazz/PregFilterListener;

    iput-object p2, p0, Lrexsee/core/browser/clazz/PregFilterListener$1;->val$browser:Lrexsee/core/browser/Browser;

    iput-object p3, p0, Lrexsee/core/browser/clazz/PregFilterListener$1;->val$url:Ljava/lang/String;

    .line 19
    invoke-direct {p0}, Ljava/lang/Thread;-><init>()V

    return-void
.end method


# virtual methods
.method public run()V
    .locals 8

    .prologue
    .line 22
    iget-object v0, p0, Lrexsee/core/browser/clazz/PregFilterListener$1;->val$browser:Lrexsee/core/browser/Browser;

    iget-object v0, v0, Lrexsee/core/browser/Browser;->urlListeners:Lrexsee/core/browser/RexseeUrl;

    iget-object v1, p0, Lrexsee/core/browser/clazz/PregFilterListener$1;->val$url:Ljava/lang/String;

    invoke-virtual {v0, v1}, Lrexsee/core/browser/RexseeUrl;->getContent(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    .line 23
    .local v2, "code":Ljava/lang/String;
    iget-object v0, p0, Lrexsee/core/browser/clazz/PregFilterListener$1;->val$browser:Lrexsee/core/browser/Browser;

    iget-object v0, v0, Lrexsee/core/browser/Browser;->progressDialog:Lrexsee/core/progress/RexseeProgressDialog;

    sget-object v1, Lrexsee/core/lang/RexseeLanguage;->PROGRESS_ONGOING:Ljava/lang/String;

    invoke-virtual {v0, v1}, Lrexsee/core/progress/RexseeProgressDialog;->show(Ljava/lang/String;)V

    .line 24
    const-string v0, "[Exception]"

    invoke-virtual {v2, v0}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 25
    iget-object v0, p0, Lrexsee/core/browser/clazz/PregFilterListener$1;->val$browser:Lrexsee/core/browser/Browser;

    iget-object v0, v0, Lrexsee/core/browser/Browser;->progressDialog:Lrexsee/core/progress/RexseeProgressDialog;

    invoke-virtual {v0}, Lrexsee/core/progress/RexseeProgressDialog;->hide()V

    .line 26
    iget-object v0, p0, Lrexsee/core/browser/clazz/PregFilterListener$1;->val$browser:Lrexsee/core/browser/Browser;

    const-string v1, "PregFilterListener"

    invoke-virtual {v0, v1, v2}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/String;)V

    .line 35
    :goto_0
    return-void

    .line 28
    :cond_0
    const/4 v6, 0x0

    .local v6, "i":I
    :goto_1
    iget-object v0, p0, Lrexsee/core/browser/clazz/PregFilterListener$1;->this$0:Lrexsee/core/browser/clazz/PregFilterListener;

    iget-object v0, v0, Lrexsee/core/browser/clazz/PregFilterListener;->pregPairs:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    if-lt v6, v0, :cond_2

    .line 32
    sget-boolean v0, Lrexsee/core/browser/RexseePregFilter;->mIsDebuging:Z

    if-eqz v0, :cond_1

    iget-object v0, p0, Lrexsee/core/browser/clazz/PregFilterListener$1;->val$browser:Lrexsee/core/browser/Browser;

    iget-object v0, v0, Lrexsee/core/browser/Browser;->application:Lrexsee/core/application/RexseeApplication;

    invoke-virtual {v0, v2}, Lrexsee/core/application/RexseeApplication;->alert(Ljava/lang/String;)V

    .line 33
    :cond_1
    iget-object v0, p0, Lrexsee/core/browser/clazz/PregFilterListener$1;->val$browser:Lrexsee/core/browser/Browser;

    iget-object v1, p0, Lrexsee/core/browser/clazz/PregFilterListener$1;->val$url:Ljava/lang/String;

    const-string v3, "text/html"

    const-string v4, "UTF-8"

    iget-object v5, p0, Lrexsee/core/browser/clazz/PregFilterListener$1;->val$url:Ljava/lang/String;

    invoke-virtual/range {v0 .. v5}, Lrexsee/core/browser/Browser;->loadDataWithBaseURL(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    goto :goto_0

    .line 29
    :cond_2
    iget-object v0, p0, Lrexsee/core/browser/clazz/PregFilterListener$1;->this$0:Lrexsee/core/browser/clazz/PregFilterListener;

    iget-object v0, v0, Lrexsee/core/browser/clazz/PregFilterListener;->pregPairs:Ljava/util/ArrayList;

    invoke-virtual {v0, v6}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v7

    check-cast v7, Lrexsee/core/browser/clazz/PregPair;

    .line 30
    .local v7, "pair":Lrexsee/core/browser/clazz/PregPair;
    iget-object v0, v7, Lrexsee/core/browser/clazz/PregPair;->source:Ljava/lang/String;

    iget-object v1, v7, Lrexsee/core/browser/clazz/PregPair;->replacement:Ljava/lang/String;

    invoke-virtual {v2, v0, v1}, Ljava/lang/String;->replaceAll(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    .line 28
    add-int/lit8 v6, v6, 0x1

    goto :goto_1
.end method
